package pages;

import core.TestBase;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import utils.Log4Test;

/**
 * Created by Фокстрот on 13.07.2014.
 */
public class CompareGoodsPage extends TestBase {


    protected By compareTitle = By.xpath("//*[@class='title-page']/h1");
    protected WebElement compareTitleVerify;

    protected By firstItemInCompare = By.xpath("//*[@class='title']/a[contains(text(),'Apple MacBook Pro Retina 15\" (Z0PU002JE) Официальная гарантия!')]");
    protected WebElement firstItem;

    protected By secondItemInCompare = By.xpath("//*[@class='title']/a[contains(text(),'Apple MacBook Pro Retina 15\" (ME294UA/A) Официальная гарантия!')]");
    protected WebElement secondItem;



    public String verifyCompareTitle(){
        Log4Test.info("Verify compare title");
        compareTitleVerify = webDriver.findElement(compareTitle);
        return compareTitleVerify.getText();

    }

    public String verifyFirstItemInCompareList(){
        Log4Test.info("Verify first item in compare list");
        firstItem = webDriver.findElement(firstItemInCompare);
        return firstItem.getText();

    }


    public String verifySecondItemInCompareList(){
        Log4Test.info("Verify second item in compare list");
        secondItem = webDriver.findElement(secondItemInCompare);
        return secondItem.getText();

    }

}


